package com.security.spring.controller;

import com.security.spring.web.rq.RegisterMemberDTO;
import com.security.spring.web.rs.UserDTO;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController()
@RequestMapping("/member/api/v1")
public class UserController extends BaseController {
    @GetMapping("member_info")
    public UserDTO getUserDetail(@RequestHeader("Authorization") String memberToken) {
        return getUser();
    }

    /**
     * 只负责注册，用户信息通过user_info接入？或者注册提供接入用户信息数据
     *
     * @param memberToken
     * @param registerMemberDTO
     */
    @PutMapping("register")
    public void register(@RequestHeader("Authorization") String memberToken, @RequestBody RegisterMemberDTO registerMemberDTO) {
    }

    @PutMapping("user")
    public void updateUser() {

    }

    @PutMapping("user_info")
    public void saveMemberInfo() {

    }
}
